﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ISHotelApp.Database;
using ISHotelApp.XML;

namespace ISHotel_WinForm
{
    public partial class HosteXML : Form
    {
        public HosteXML()
        {
            InitializeComponent();
        }

        private void HosteXML_Load(object sender, EventArgs e)
        {
            try
            {
                List<Host> hoste = LoadFromXML.loadHostsList();
                dataGridViewHost.DataSource = hoste;
            }
            catch (Exception ex)
            {
                dataGridViewHost.Visible = false;
                ErrLabel.Visible = true;
                ErrLabel.Text = ex.Message;
            }

            

        }
    }
}
